package com.it.text;

import java.util.Scanner;

public class StringText02 {

    public static void main(String[] args) {

        Scanner sc=new Scanner(System.in);
        System.out.println("请输入一个字符串:");
        String str=sc.nextLine();

        char[] charArray = str.toCharArray();
        int A=0,a=0,num=0;
        for (int i = 0; i < charArray.length; i++) {
            if(charArray[i] >= 'a' && charArray[i]<='z'){
                a++;
            }else if(charArray[i] >= 'A' && charArray[i]<='Z'){
             A++;
            }else if(charArray[i] >= '0' && charArray[i]<='9'){
                num++;
            }
        }
        System.out.println("大写字母个数：" + A + " 小写字母个数：" + a + " 数字个数：" + num);

    }


}
